import Vue from 'vue'
import mainContain from "@/components/main-contain/mainContain.vue";
import wenjuanRender from '@/components/form-render/wenjuanRender.vue'
import VueSignaturePad from 'vue-signature-pad';
import '@/components/AudioPlayerWithMarkers/index'
import '@/components/form-designer/widget-panel/fomt-content/index'
import '@/components/form-designer/widget-panel/main-comp-panal/index'
import '@/components/form-designer/rightGlobalForm/index'
import '@/components/form-designer/widget-panel/parent-form-comp/index'
import '@/components/renderRemark/index'
import '@/components/Editor/index'
import '@/components/code-editor/index'
import '@/assets/iconfont.css'
import '@/styles/index.scss'
import '@/styles/global.scss'
Vue.use(VueSignaturePad)
// 为组件提供 install 安装方法，供按需引入
mainContain.install = function (Vue) {
    Vue.component(mainContain.name, mainContain)
}
wenjuanRender.install = function (Vue) {
    Vue.component(wenjuanRender.name, wenjuanRender)
}

const components = [
    mainContain,
    wenjuanRender,
]

const install = (Vue) => {
    // window.axios = axios
    components.forEach(component => {
        Vue.component(component.name, component)
    })
}

if (typeof window !== 'undefined' && window.Vue) { /* script方式引入时主动调用install方法！！ */
    install(window.Vue);
}

export default {
    install,
    mainContain,
    wenjuanRender,
}
